/*
(C) Copyright MarketLive. 2006. All rights reserved.
MarketLive is a trademark of MarketLive, Inc.
Warning: This computer program is protected by copyright law and international treaties.
Unauthorized reproduction or distribution of this program, or any portion of it, may result
in severe civil and criminal penalties, and will be prosecuted to the maximum extent
possible under the law.
*/
package com.marketlive.entity.account;

import java.util.List;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.marketlive.entity.IEntityHome;
import org.marketlive.entity.account.IAccountSet;
import org.marketlive.entity.account.IAccountSetHome;

import com.marketlive.entity.Entity;

public class AccountSet extends Entity implements IAccountSet {

    private static Log log = LogFactory.getLog(AccountSet.class);

    /**
     * Entity type constant.
     */
    public static final String ENTITY_TYPE = "accountSet";

    /**
     * Home Object Interface.
     */
    private static IAccountSetHome entityHome;

    /** A friendly name for this account set. */
    private String name;
    
    /**
     * Set the Entity Home to the given Customer Home Object.
     * @param entityHome - Entity Home Object to use for accounts.
     */
    public static void setEntityHome(final IAccountSetHome entityHome) {
        AccountSet.entityHome = entityHome;
    }

    /**
     * @inheritDoc
     */
    public IEntityHome getEntityHome() {
        return (IEntityHome) entityHome;
    }

    public AccountSet() {
    }
    
    /**
     * Creates a AccountSet with the input parameters name and code.
     * 
     * @param code AccountSet code
     * @param name AccountSet name
     */
    public AccountSet(final String code, final String name) {
        this.setCode(code);
        this.setName(name);
    }

    /**
     * {@inheritDoc}
     */

    public String getName() {
        return name;
    }

    /**
     * {@inheritDoc}
     */

    public void setName(final String name) {
        this.name = name;
    }
}
